home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / SAT 2.3b4 / Misc / SATold / SAToldlib.p < prev   
Text File  |  1994-08-22  |  3KB  |  99 lines

  1. {I have successively moved the names used in SAT from the rather arbitrary names it had to a more strict naming}
  2. {scheme, with SAT in the beginning (or at least SOMEWHERE) in all routine names. Now when I finally fixed the core}
  3. {routines, I can't demand all old SAT users to change all their code right away. I know how it is, but . This is the backwards compatibility}
  4. {file for Pascal users.}
  5.  
  6. {To make old SAT programs (made for SAT up to 2.1.2) work without updating to the new names, do the following:}
  7. {- Include SATold.lib in the project.}
  8. {- Uncomment the declarations in SAT.p. Note that you can't recompile SATold.lib with SAT.p in such a state.}
  9. {- Some names are not supported by SATold.lib, most notably colorFlag, which CAN'T be supported that way.}
  10. {Change all references to colorFlag to gSAT.colorFlag.}
  11.  
  12. {However, if your project isn't extremely big and complext, it's just as easy to change the calls to the new}
  13. {names.}
  14.  
  15. unit SATold;
  16.  
  17. interface
  18.     uses
  19.         SAT;
  20.  
  21.     function NewSprite (theKind, hpos, vpos: integer; setup: ProcPtr): SpritePtr;
  22.     function NewSpriteAfter (afterthis: SpritePtr; theKind, hpos, vpos: integer; setup: ProcPtr): SpritePtr;
  23.  
  24.     function GetFace (ResNum: integer): FacePtr;
  25.     procedure DisposeFace (TheFace: FacePtr);
  26.  
  27.     procedure KillSprite (who: Spriteptr);
  28.     procedure PeekOffscreen; {Old name for SATRedraw}
  29.  
  30.     procedure ConfigureSAT (PICTfit: boolean; newSorting, newCollision, searchWidth: integer);
  31.     procedure InitSAT (pictID, bwpictID, Xsize, Ysize: integer);
  32.     procedure CustomInitSAT (pictID, bwpictID: integer; SATdrawingArea: Rect; {}
  33.                                     preloadedWind: WindowPtr; chosenScreen: GDHandle; useMenuBar, {}
  34.                                     centerDrawingArea, fillScreen, dither4bit, beSmart: Boolean);{}
  35.     procedure SkipSAT;
  36.     procedure KillSAT; {Dispose of offscreen buffers to allow re-init}
  37.     procedure RunSAT (fast: Boolean);
  38.  
  39. implementation
  40.  
  41.     function NewSpriteAfter (afterthis: SpritePtr; theKind, hpos, vpos: integer; setup: ProcPtr): SpritePtr;
  42.     begin
  43.         NewSpriteAfter := SATNewSpritePP(afterthis, nil, theKind, hpos, vpos, setup);
  44.     end;
  45.  
  46.     function NewSprite (theKind, hpos, vpos: integer; setup: ProcPtr): SpritePtr;
  47.     begin
  48.         NewSprite := SATNewSpritePP(nil, nil, theKind, hpos, vpos, setup);
  49.     end;
  50.  
  51.     function GetFace (resNum: integer): FacePtr;
  52.     begin
  53.         GetFace := SATGetFace(resNum);
  54.     end;
  55.  
  56.     procedure DisposeFace (theFace: FacePtr);
  57.     begin
  58.         SATDisposeFacePP(theFace);
  59.         DisposePtr(Ptr(theFace));
  60.     end;
  61.  
  62.     procedure KillSprite (who: SpritePtr);
  63.     begin
  64.         SATKillSprite(who);
  65.     end;
  66.  
  67. {Old name for SATRedraw - kept for backwards compatibility}
  68.     procedure PeekOffscreen;
  69.     begin
  70.         SATRedraw;
  71.     end;
  72.  
  73.     procedure ConfigureSAT (PICTfit: boolean; newSorting, newCollision, searchWidth: integer);
  74.     begin
  75.         SATConfigure(PICTfit, newSorting, newCollision, searchWidth);
  76.     end;
  77.     procedure InitSAT (pictID, bwpictID, Xsize, Ysize: integer);
  78.     begin
  79.     end;
  80.     procedure CustomInitSAT (pictID, bwpictID: integer; SATdrawingArea: Rect; {}
  81.                                     preloadedWind: WindowPtr; chosenScreen: GDHandle; useMenuBar, {}
  82.                                     centerDrawingArea, fillScreen, dither4bit, beSmart: Boolean);{}
  83.     begin
  84.         SATCustomInit(pictID, bwpictID, SATdrawingArea, preloadedWind, chosenScreen, useMenuBar, centerDrawingArea, fillScreen, dither4bit, beSmart);{}
  85.     end;
  86.     procedure SkipSAT;
  87.     begin
  88.         SATSkip;
  89.     end;
  90.     procedure KillSAT; {Dispose of offscreen buffers to allow re-init}
  91.     begin
  92.         SATKill;
  93.     end;
  94.     procedure RunSAT (fast: Boolean);
  95.     begin
  96.         SATRun(fast);
  97.     end;
  98.  
  99. end.